3.2.36 \(\int \frac {(a g+b g x)^2 (A+B \log (e (\frac {a+b x}{c+d x})^n))}{c i+d i x} \, dx\) [136]

3.2.36.1 Optimal result
3.2.36.2 Mathematica [A] (verified)
3.2.36.3 Rubi [A] (verified)
3.2.36.4 Maple [F]
3.2.36.5 Fricas [F]
3.2.36.6 Sympy [F]
3.2.36.7 Maxima [B] (verification not implemented)
3.2.36.8 Giac [B] (verification not implemented)
3.2.36.9 Mupad [F(-1)]

3.2.36.1 Optimal result

Integrand size = 43, antiderivative size = 211 \[ \int \frac {(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{c i+d i x} \, dx=\frac {g^2 (a+b x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{2 d i}-\frac {(b c-a d) g^2 (a+b x) \left (2 A+B n+2 B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{2 d^2 i}-\frac {(b c-a d)^2 g^2 \left (2 A+3 B n+2 B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log \left (\frac {b c-a d}{b (c+d x)}\right )}{2 d^3 i}-\frac {B (b c-a d)^2 g^2 n \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right )}{d^3 i} \]

output
1/2*g^2*(b*x+a)^2*(A+B*ln(e*((b*x+a)/(d*x+c))^n))/d/i-1/2*(-a*d+b*c)*g^2*( 
b*x+a)*(2*A+B*n+2*B*ln(e*((b*x+a)/(d*x+c))^n))/d^2/i-1/2*(-a*d+b*c)^2*g^2* 
(2*A+3*B*n+2*B*ln(e*((b*x+a)/(d*x+c))^n))*ln((-a*d+b*c)/b/(d*x+c))/d^3/i-B 
*(-a*d+b*c)^2*g^2*n*polylog(2,d*(b*x+a)/b/(d*x+c))/d^3/i
 
3.2.36.2 Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 266, normalized size of antiderivative = 1.26 \[ \int \frac {(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{c i+d i x} \, dx=\frac {g^2 \left (-2 A b d (b c-a d) x+2 B d (-b c+a d) (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+d^2 (a+b x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+2 B (b c-a d)^2 n \log (c+d x)-B (b c-a d) n (b d x+(-b c+a d) \log (c+d x))+2 (b c-a d)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (i (c+d x))-B (b c-a d)^2 n \left (\left (2 \log \left (\frac {d (a+b x)}{-b c+a d}\right )-\log (i (c+d x))\right ) \log (i (c+d x))+2 \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{b c-a d}\right )\right )\right )}{2 d^3 i} \]

input
Integrate[((a*g + b*g*x)^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))/(c*i + 
d*i*x),x]
 
output
(g^2*(-2*A*b*d*(b*c - a*d)*x + 2*B*d*(-(b*c) + a*d)*(a + b*x)*Log[e*((a + 
b*x)/(c + d*x))^n] + d^2*(a + b*x)^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n] 
) + 2*B*(b*c - a*d)^2*n*Log[c + d*x] - B*(b*c - a*d)*n*(b*d*x + (-(b*c) + 
a*d)*Log[c + d*x]) + 2*(b*c - a*d)^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n] 
)*Log[i*(c + d*x)] - B*(b*c - a*d)^2*n*((2*Log[(d*(a + b*x))/(-(b*c) + a*d 
)] - Log[i*(c + d*x)])*Log[i*(c + d*x)] + 2*PolyLog[2, (b*(c + d*x))/(b*c 
- a*d)])))/(2*d^3*i)
 
3.2.36.3 Rubi [A] (verified)

Time = 0.57 (sec) , antiderivative size = 238, normalized size of antiderivative = 1.13, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.116, Rules used = {2961, 2784, 2784, 2754, 2838}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(a g+b g x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{c i+d i x} \, dx\)

\(\Big \downarrow \) 2961

\(\displaystyle \frac {g^2 (b c-a d)^2 \int \frac {(a+b x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(c+d x)^2 \left (b-\frac {d (a+b x)}{c+d x}\right )^3}d\frac {a+b x}{c+d x}}{i}\)

\(\Big \downarrow \) 2784

\(\displaystyle \frac {g^2 (b c-a d)^2 \left (\frac {(a+b x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{2 d (c+d x)^2 \left (b-\frac {d (a+b x)}{c+d x}\right )^2}-\frac {\int \frac {(a+b x) \left (2 A+B n+2 B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(c+d x) \left (b-\frac {d (a+b x)}{c+d x}\right )^2}d\frac {a+b x}{c+d x}}{2 d}\right )}{i}\)

\(\Big \downarrow \) 2784

\(\displaystyle \frac {g^2 (b c-a d)^2 \left (\frac {(a+b x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{2 d (c+d x)^2 \left (b-\frac {d (a+b x)}{c+d x}\right )^2}-\frac {\frac {(a+b x) \left (2 B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+2 A+B n\right )}{d (c+d x) \left (b-\frac {d (a+b x)}{c+d x}\right )}-\frac {\int \frac {2 A+3 B n+2 B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b-\frac {d (a+b x)}{c+d x}}d\frac {a+b x}{c+d x}}{d}}{2 d}\right )}{i}\)

\(\Big \downarrow \) 2754

\(\displaystyle \frac {g^2 (b c-a d)^2 \left (\frac {(a+b x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{2 d (c+d x)^2 \left (b-\frac {d (a+b x)}{c+d x}\right )^2}-\frac {\frac {(a+b x) \left (2 B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+2 A+B n\right )}{d (c+d x) \left (b-\frac {d (a+b x)}{c+d x}\right )}-\frac {\frac {2 B n \int \frac {(c+d x) \log \left (1-\frac {d (a+b x)}{b (c+d x)}\right )}{a+b x}d\frac {a+b x}{c+d x}}{d}-\frac {\log \left (1-\frac {d (a+b x)}{b (c+d x)}\right ) \left (2 B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+2 A+3 B n\right )}{d}}{d}}{2 d}\right )}{i}\)

\(\Big \downarrow \) 2838

\(\displaystyle \frac {g^2 (b c-a d)^2 \left (\frac {(a+b x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{2 d (c+d x)^2 \left (b-\frac {d (a+b x)}{c+d x}\right )^2}-\frac {\frac {(a+b x) \left (2 B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+2 A+B n\right )}{d (c+d x) \left (b-\frac {d (a+b x)}{c+d x}\right )}-\frac {-\frac {\log \left (1-\frac {d (a+b x)}{b (c+d x)}\right ) \left (2 B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+2 A+3 B n\right )}{d}-\frac {2 B n \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right )}{d}}{d}}{2 d}\right )}{i}\)

input
Int[((a*g + b*g*x)^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))/(c*i + d*i*x) 
,x]
 
output
((b*c - a*d)^2*g^2*(((a + b*x)^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))/( 
2*d*(c + d*x)^2*(b - (d*(a + b*x))/(c + d*x))^2) - (((a + b*x)*(2*A + B*n 
+ 2*B*Log[e*((a + b*x)/(c + d*x))^n]))/(d*(c + d*x)*(b - (d*(a + b*x))/(c 
+ d*x))) - (-(((2*A + 3*B*n + 2*B*Log[e*((a + b*x)/(c + d*x))^n])*Log[1 - 
(d*(a + b*x))/(b*(c + d*x))])/d) - (2*B*n*PolyLog[2, (d*(a + b*x))/(b*(c + 
 d*x))])/d)/d)/(2*d)))/i
 

3.2.36.3.1 Defintions of rubi rules used

rule 2754
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symb 
ol] :> Simp[Log[1 + e*(x/d)]*((a + b*Log[c*x^n])^p/e), x] - Simp[b*n*(p/e) 
  Int[Log[1 + e*(x/d)]*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, 
b, c, d, e, n}, x] && IGtQ[p, 0]
 

rule 2784
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)* 
(x_))^(q_.), x_Symbol] :> Simp[(f*x)^m*(d + e*x)^(q + 1)*((a + b*Log[c*x^n] 
)/(e*(q + 1))), x] - Simp[f/(e*(q + 1))   Int[(f*x)^(m - 1)*(d + e*x)^(q + 
1)*(a*m + b*n + b*m*Log[c*x^n]), x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, 
x] && ILtQ[q, -1] && GtQ[m, 0]
 

rule 2838
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 
, (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
 

rule 2961
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( 
B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m_.)*((h_.) + (i_.)*(x_))^(q_.), x_Symbol 
] :> Simp[(b*c - a*d)^(m + q + 1)*(g/b)^m*(i/d)^q   Subst[Int[x^m*((A + B*L 
og[e*x^n])^p/(b - d*x)^(m + q + 2)), x], x, (a + b*x)/(c + d*x)], x] /; Fre 
eQ[{a, b, c, d, e, f, g, h, i, A, B, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[ 
b*f - a*g, 0] && EqQ[d*h - c*i, 0] && IntegersQ[m, q]
 
3.2.36.4 Maple [F]

\[\int \frac {\left (b g x +a g \right )^{2} \left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )}{d i x +c i}d x\]

input
int((b*g*x+a*g)^2*(A+B*ln(e*((b*x+a)/(d*x+c))^n))/(d*i*x+c*i),x)
 
output
int((b*g*x+a*g)^2*(A+B*ln(e*((b*x+a)/(d*x+c))^n))/(d*i*x+c*i),x)
 
3.2.36.5 Fricas [F]

\[ \int \frac {(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{c i+d i x} \, dx=\int { \frac {{\left (b g x + a g\right )}^{2} {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}}{d i x + c i} \,d x } \]

input
integrate((b*g*x+a*g)^2*(A+B*log(e*((b*x+a)/(d*x+c))^n))/(d*i*x+c*i),x, al 
gorithm="fricas")
 
output
integral((A*b^2*g^2*x^2 + 2*A*a*b*g^2*x + A*a^2*g^2 + (B*b^2*g^2*x^2 + 2*B 
*a*b*g^2*x + B*a^2*g^2)*log(e*((b*x + a)/(d*x + c))^n))/(d*i*x + c*i), x)
 
3.2.36.6 Sympy [F]

\[ \int \frac {(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{c i+d i x} \, dx=\frac {g^{2} \left (\int \frac {A a^{2}}{c + d x}\, dx + \int \frac {A b^{2} x^{2}}{c + d x}\, dx + \int \frac {B a^{2} \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{c + d x}\, dx + \int \frac {2 A a b x}{c + d x}\, dx + \int \frac {B b^{2} x^{2} \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{c + d x}\, dx + \int \frac {2 B a b x \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{c + d x}\, dx\right )}{i} \]

input
integrate((b*g*x+a*g)**2*(A+B*ln(e*((b*x+a)/(d*x+c))**n))/(d*i*x+c*i),x)
 
output
g**2*(Integral(A*a**2/(c + d*x), x) + Integral(A*b**2*x**2/(c + d*x), x) + 
 Integral(B*a**2*log(e*(a/(c + d*x) + b*x/(c + d*x))**n)/(c + d*x), x) + I 
ntegral(2*A*a*b*x/(c + d*x), x) + Integral(B*b**2*x**2*log(e*(a/(c + d*x) 
+ b*x/(c + d*x))**n)/(c + d*x), x) + Integral(2*B*a*b*x*log(e*(a/(c + d*x) 
 + b*x/(c + d*x))**n)/(c + d*x), x))/i
 
3.2.36.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 627 vs. \(2 (204) = 408\).

Time = 0.50 (sec) , antiderivative size = 627, normalized size of antiderivative = 2.97 \[ \int \frac {(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{c i+d i x} \, dx=2 \, A a b g^{2} {\left (\frac {x}{d i} - \frac {c \log \left (d x + c\right )}{d^{2} i}\right )} + \frac {1}{2} \, A b^{2} g^{2} {\left (\frac {2 \, c^{2} \log \left (d x + c\right )}{d^{3} i} + \frac {d x^{2} - 2 \, c x}{d^{2} i}\right )} + \frac {A a^{2} g^{2} \log \left (d i x + c i\right )}{d i} + \frac {{\left (b^{2} c^{2} g^{2} n - 2 \, a b c d g^{2} n + a^{2} d^{2} g^{2} n\right )} {\left (\log \left (b x + a\right ) \log \left (\frac {b d x + a d}{b c - a d} + 1\right ) + {\rm Li}_2\left (-\frac {b d x + a d}{b c - a d}\right )\right )} B}{d^{3} i} + \frac {{\left (2 \, a^{2} d^{2} g^{2} \log \left (e\right ) + {\left (3 \, g^{2} n + 2 \, g^{2} \log \left (e\right )\right )} b^{2} c^{2} - 4 \, {\left (g^{2} n + g^{2} \log \left (e\right )\right )} a b c d\right )} B \log \left (d x + c\right )}{2 \, d^{3} i} + \frac {B b^{2} d^{2} g^{2} x^{2} \log \left (e\right ) - 2 \, {\left (b^{2} c^{2} g^{2} n - 2 \, a b c d g^{2} n + a^{2} d^{2} g^{2} n\right )} B \log \left (b x + a\right ) \log \left (d x + c\right ) + {\left (b^{2} c^{2} g^{2} n - 2 \, a b c d g^{2} n + a^{2} d^{2} g^{2} n\right )} B \log \left (d x + c\right )^{2} - {\left ({\left (g^{2} n + 2 \, g^{2} \log \left (e\right )\right )} b^{2} c d - {\left (g^{2} n + 4 \, g^{2} \log \left (e\right )\right )} a b d^{2}\right )} B x - {\left (2 \, a b c d g^{2} n - 3 \, a^{2} d^{2} g^{2} n\right )} B \log \left (b x + a\right ) + {\left (B b^{2} d^{2} g^{2} x^{2} - 2 \, {\left (b^{2} c d g^{2} - 2 \, a b d^{2} g^{2}\right )} B x + 2 \, {\left (b^{2} c^{2} g^{2} - 2 \, a b c d g^{2} + a^{2} d^{2} g^{2}\right )} B \log \left (d x + c\right )\right )} \log \left ({\left (b x + a\right )}^{n}\right ) - {\left (B b^{2} d^{2} g^{2} x^{2} - 2 \, {\left (b^{2} c d g^{2} - 2 \, a b d^{2} g^{2}\right )} B x + 2 \, {\left (b^{2} c^{2} g^{2} - 2 \, a b c d g^{2} + a^{2} d^{2} g^{2}\right )} B \log \left (d x + c\right )\right )} \log \left ({\left (d x + c\right )}^{n}\right )}{2 \, d^{3} i} \]

input
integrate((b*g*x+a*g)^2*(A+B*log(e*((b*x+a)/(d*x+c))^n))/(d*i*x+c*i),x, al 
gorithm="maxima")
 
output
2*A*a*b*g^2*(x/(d*i) - c*log(d*x + c)/(d^2*i)) + 1/2*A*b^2*g^2*(2*c^2*log( 
d*x + c)/(d^3*i) + (d*x^2 - 2*c*x)/(d^2*i)) + A*a^2*g^2*log(d*i*x + c*i)/( 
d*i) + (b^2*c^2*g^2*n - 2*a*b*c*d*g^2*n + a^2*d^2*g^2*n)*(log(b*x + a)*log 
((b*d*x + a*d)/(b*c - a*d) + 1) + dilog(-(b*d*x + a*d)/(b*c - a*d)))*B/(d^ 
3*i) + 1/2*(2*a^2*d^2*g^2*log(e) + (3*g^2*n + 2*g^2*log(e))*b^2*c^2 - 4*(g 
^2*n + g^2*log(e))*a*b*c*d)*B*log(d*x + c)/(d^3*i) + 1/2*(B*b^2*d^2*g^2*x^ 
2*log(e) - 2*(b^2*c^2*g^2*n - 2*a*b*c*d*g^2*n + a^2*d^2*g^2*n)*B*log(b*x + 
 a)*log(d*x + c) + (b^2*c^2*g^2*n - 2*a*b*c*d*g^2*n + a^2*d^2*g^2*n)*B*log 
(d*x + c)^2 - ((g^2*n + 2*g^2*log(e))*b^2*c*d - (g^2*n + 4*g^2*log(e))*a*b 
*d^2)*B*x - (2*a*b*c*d*g^2*n - 3*a^2*d^2*g^2*n)*B*log(b*x + a) + (B*b^2*d^ 
2*g^2*x^2 - 2*(b^2*c*d*g^2 - 2*a*b*d^2*g^2)*B*x + 2*(b^2*c^2*g^2 - 2*a*b*c 
*d*g^2 + a^2*d^2*g^2)*B*log(d*x + c))*log((b*x + a)^n) - (B*b^2*d^2*g^2*x^ 
2 - 2*(b^2*c*d*g^2 - 2*a*b*d^2*g^2)*B*x + 2*(b^2*c^2*g^2 - 2*a*b*c*d*g^2 + 
 a^2*d^2*g^2)*B*log(d*x + c))*log((d*x + c)^n))/(d^3*i)
 
3.2.36.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 2499 vs. \(2 (204) = 408\).

Time = 130.46 (sec) , antiderivative size = 2499, normalized size of antiderivative = 11.84 \[ \int \frac {(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{c i+d i x} \, dx=\text {Too large to display} \]

input
integrate((b*g*x+a*g)^2*(A+B*log(e*((b*x+a)/(d*x+c))^n))/(d*i*x+c*i),x, al 
gorithm="giac")
 
output
1/24*(2*(B*b^7*c^5*g^2*n - 5*B*a*b^6*c^4*d*g^2*n - 4*(b*x + a)*B*b^6*c^5*d 
*g^2*n/(d*x + c) + 10*B*a^2*b^5*c^3*d^2*g^2*n + 20*(b*x + a)*B*a*b^5*c^4*d 
^2*g^2*n/(d*x + c) + 6*(b*x + a)^2*B*b^5*c^5*d^2*g^2*n/(d*x + c)^2 - 10*B* 
a^3*b^4*c^2*d^3*g^2*n - 40*(b*x + a)*B*a^2*b^4*c^3*d^3*g^2*n/(d*x + c) - 3 
0*(b*x + a)^2*B*a*b^4*c^4*d^3*g^2*n/(d*x + c)^2 + 5*B*a^4*b^3*c*d^4*g^2*n 
+ 40*(b*x + a)*B*a^3*b^3*c^2*d^4*g^2*n/(d*x + c) + 60*(b*x + a)^2*B*a^2*b^ 
3*c^3*d^4*g^2*n/(d*x + c)^2 - B*a^5*b^2*d^5*g^2*n - 20*(b*x + a)*B*a^4*b^2 
*c*d^5*g^2*n/(d*x + c) - 60*(b*x + a)^2*B*a^3*b^2*c^2*d^5*g^2*n/(d*x + c)^ 
2 + 4*(b*x + a)*B*a^5*b*d^6*g^2*n/(d*x + c) + 30*(b*x + a)^2*B*a^4*b*c*d^6 
*g^2*n/(d*x + c)^2 - 6*(b*x + a)^2*B*a^5*d^7*g^2*n/(d*x + c)^2)*log((b*x + 
 a)/(d*x + c))/(b^4*d^3*i - 4*(b*x + a)*b^3*d^4*i/(d*x + c) + 6*(b*x + a)^ 
2*b^2*d^5*i/(d*x + c)^2 - 4*(b*x + a)^3*b*d^6*i/(d*x + c)^3 + (b*x + a)^4* 
d^7*i/(d*x + c)^4) + (B*b^8*c^5*g^2*n - 5*B*a*b^7*c^4*d*g^2*n - 2*(b*x + a 
)*B*b^7*c^5*d*g^2*n/(d*x + c) + 10*B*a^2*b^6*c^3*d^2*g^2*n + 10*(b*x + a)* 
B*a*b^6*c^4*d^2*g^2*n/(d*x + c) - (b*x + a)^2*B*b^6*c^5*d^2*g^2*n/(d*x + c 
)^2 - 10*B*a^3*b^5*c^2*d^3*g^2*n - 20*(b*x + a)*B*a^2*b^5*c^3*d^3*g^2*n/(d 
*x + c) + 5*(b*x + a)^2*B*a*b^5*c^4*d^3*g^2*n/(d*x + c)^2 + 2*(b*x + a)^3* 
B*b^5*c^5*d^3*g^2*n/(d*x + c)^3 + 5*B*a^4*b^4*c*d^4*g^2*n + 20*(b*x + a)*B 
*a^3*b^4*c^2*d^4*g^2*n/(d*x + c) - 10*(b*x + a)^2*B*a^2*b^4*c^3*d^4*g^2*n/ 
(d*x + c)^2 - 10*(b*x + a)^3*B*a*b^4*c^4*d^4*g^2*n/(d*x + c)^3 - B*a^5*...
 
3.2.36.9 Mupad [F(-1)]

Timed out. \[ \int \frac {(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{c i+d i x} \, dx=\int \frac {{\left (a\,g+b\,g\,x\right )}^2\,\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right )}{c\,i+d\,i\,x} \,d x \]

input
int(((a*g + b*g*x)^2*(A + B*log(e*((a + b*x)/(c + d*x))^n)))/(c*i + d*i*x) 
,x)
 
output
int(((a*g + b*g*x)^2*(A + B*log(e*((a + b*x)/(c + d*x))^n)))/(c*i + d*i*x) 
, x)